//获得文章总量
$.ajax({
    type:'get',   
    url:'http://localhost:3000/posts/count',
    success: function(res){
        console.log(res);
        $("#post").html(`${res.postCount}篇文章(${res.draftCount}篇草稿)`)     
    }
})

//获得分类总量
$.ajax({
    type:'get',
    url:'http://localhost:3000/categories/count',
    success: function(res){
        console.log(res);
        $("#category").html(`${res.categoryCount}分类`)
    }
})

//评论
$.ajax({
    type:'get',
    url:'http://localhost:3000/comments/count',
    success: function(res){
        console.log(res);
        $("#comment").html(`${res.commentCount}评论`)
    }
})